GtkEntryCompletion: fix sizing bug with multiple cells
authorMatt Watson <mattdangerw@gmail.com>
Wed, 3 Dec 2014 08:24:43 +0000 (00:24 -0800)
committerCosimo Cecchi <cosimoc@gnome.org>
Wed, 10 Dec 2014 21:29:32 +0000 (13:29 -0800)
commitf50d1b2584b2d925d2e0f5dc7dba4460c058bd68
tree6f8c92035d7aa469e82fe3ba0797bff06f0da3f1
parenta083809b937e6714ff9259e53ff28d659fb427e2
GtkEntryCompletion: fix sizing bug with multiple cells

When using a completion with some custom cells in the cell layout,
if would often size wrong when first presented on screen.

The entry completion is the only place in the entire gtk code base
that calls gtk_tree_view_column_cell_get_size outside of gtktreeview
itself. It calls into the function before the tree view has done some
important validation on its cell state, the net result of which is
only the first element in the gtkcellareabox the entry completion uses
well actually have its size respected.

We now call gtk_widget_get_preferred_size on the tree view before
calling into the individual cell size routines, to guarantee that the
tree view has run its validate_rows routine and cell state is valid.

https://bugzilla.gnome.org/show_bug.cgi?id=741130
gtk/gtkentrycompletion.c